# -*- coding:utf-8 -*-
#Author LJ 
#Mail:admin@attacker.club
#Site:blog.attacker.club
#description

"""
python3 2.替换文件.py 闪耀 坚挺    yesterday1.txt
"""

import  sys


old_str = sys.argv[1]
new_str = sys.argv[2]
source_file = sys.argv[3]


with open(source_file,'r+',encoding='gbk') as  f:

	for line in f:
		if old_str in line:
			newline = line.replace(old_str,new_str)
		else:
			newline = line
		f.write(newline)





with open('yesterday1.txt','r',encoding='gbk') as  f:

	for line in f:
		print(line)

